package com.nuc.kl.module.basedata.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nuc.kl.base.DaoSupportImpl;
import com.nuc.kl.module.basedata.entity.ReferenceType;
import com.nuc.kl.module.basedata.service.ReferenceTypeSerivce;

@Service
@Transactional
public class ReferenceTypeServiceImpl extends DaoSupportImpl<ReferenceType> implements ReferenceTypeSerivce{

	public List<ReferenceType> findBySQL(int start, int number, String findName) {
		return getSession().createQuery(//
				"FROM ReferenceType WHERE name LIKE '%" + findName + "%'")//
				.setFirstResult(start)//
				.setMaxResults(number)//
				.list();
	}

}
